package org.kth.dks.dks_marshal;

import java.util.LinkedList;
import java.util.List;

public class XMLMessage {
  private List elements = null;

  public XMLMessage() {
    elements = new LinkedList();
  }

  public void addElement( XMLElement newElement ) {
    elements.add( newElement );
  }

  public int size() {
    return elements.size();
  }

  public List getElements() {
    return elements;
  }

  public XMLElement getElementAt( int index ) {
    if( index < 0 || index >= elements.size() )
      return null;
    return (XMLElement) elements.get( index );
  }
}//XMLMessage class
